'use strict';

import fetch from '../util/fetch.js';
//注册（1-个人）
export function register(orgName, idenCode, telephone, registerType) {
    return fetch('/register', {orgName: orgName, idenCode: idenCode, telephone: telephone, registerType: registerType}, 'POST');
};
//登录（1-机构，2-个人）
export function login(idenCode, telephone, loginType) {
    return fetch('/idenCode/login', {idenCode: idenCode, telephone: telephone, loginType: loginType}, 'POST');
};
//发送验证码
export function sendSmsCode(userName,telephone) {
    return fetch('/idenCode/get', {userName:userName,telephone:telephone}, 'POST');
};
//个人报名
export function indiviEnrol(userName,userCode,studentIdcard,levelCode) {
    return fetch('/sign', {userName:userName,userCode:userCode,studentIdcard:studentIdcard,levelCode:levelCode}, 'POST');
};
//个人信息
export function indiviInfo(userCode) {
    return fetch('/view', {userCode:userCode}, 'GET');
};
//机构考试信息
export function agencyExam(organCode) {
    return fetch('/exam/organ', {organCode: organCode}, 'GET');
};
//上传微信录音接口
export function upload(mediaId) {
    return fetch('/cloud/upload', {mediaId: mediaId}, 'GET');
};
// //机构考试报名
// export function indiviInfo(userCode) {
//     return fetch('/view', {userCode:userCode}, 'POST');
// };
